import React,{useEffect} from 'react';
import useStore from '../../../context/useStore';
import {Table,Space} from 'antd'
import { useObserver } from 'mobx-react-lite';
const MarkingDetail: React.FC = () => {


    let {manager}=useStore()

    useEffect(() => {
       
        /* 待批班级 */
        manager.getAllRoomListAction();
    }, [manager]);

    const columns = [
        {
          title: '班级名',
          dataIndex: 'grade_name',
          key: 'grade_id',
        },
        {
          title: '课程名称',
          dataIndex: 'subject_text',
          key: 'subject_id',
        },
        {
          title: '阅卷状态',
        //   dataIndex: 'room_text',
        //   key: 'room_id',
        },
        {
          title: '课程名称',
          dataIndex: 'subject_text',
          key: 'subject_id',
          
        },{
            title: '成材率',
            dataIndex: 'room_text',
            key: 'room_id',
          },{
            title: '操作',
            dataIndex: 'room_text',
            key: 'room_id',
            render: (record: any) => (
                <Space size="middle">
                  <button /* onClick={() => { delType(record.questions_type_id) }} */>批卷</button>
                </Space>
              ),
          },
      ];
      /* console.log(manager.allRoomList) */
    return useObserver(()=><div>
           <p>待批班级</p>
           <Table rowKey={columns[0].key} columns={columns} dataSource={manager.allRoomList} />
        </div>
    )
}

export default MarkingDetail;
